<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAttendanceStatisticsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('attendance_statistics', function (Blueprint $table) {
            $table->id();
            $table->string('day')->default('')->comment('日期');
            $table->string('department')->default('')->comment('门店');
            $table->tinyInteger('type')
                ->default(0)->comment('类型1取车;2送车;3维修取车;4维修送车;5保养取车;6取车加班;7送车加班;8清理');

            $table->string('operator')->default('')->comment('人员');

            $table->string('order_sn')->default('')->comment('订单号');
            $table->string('plate_number')->default('')->comment('车牌号');
            $table->tinyInteger('work_overtime')->default(1)->comment('1不加班2加班');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('attendance_statistics');
    }
}
